home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC_Samples / propdlg / mainfrm.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  2.1 KB  |  90 lines

  1. // mainfrm.cpp : implementation of the CMainFrame class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1999 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "stdafx.h"
  14. #include "propdlg.h"
  15. #include "colorpge.h"
  16. #include "stylepge.h"
  17. #include "shapeobj.h"
  18. #include "propsht.h"
  19. #include "propsht2.h"
  20. #include "resource.h"
  21. #include "mainfrm.h"
  22. #include "shapedoc.h"
  23. #include "shapesvw.h"
  24.  
  25. #ifdef _DEBUG
  26. #undef THIS_FILE
  27. static char BASED_CODE THIS_FILE[] = __FILE__;
  28. #endif
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CMainFrame
  32.  
  33. IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
  34.  
  35. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  36.     //{{AFX_MSG_MAP(CMainFrame)
  37.     ON_WM_CREATE()
  38.     //}}AFX_MSG_MAP
  39. END_MESSAGE_MAP()
  40.  
  41. /////////////////////////////////////////////////////////////////////////////
  42. // CMainFrame construction/destruction
  43.  
  44. CMainFrame::CMainFrame()
  45. {
  46. }
  47.  
  48. CMainFrame::~CMainFrame()
  49. {
  50. }
  51.  
  52. int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  53. {
  54.     if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
  55.         return -1;
  56.  
  57. #if (_WIN32_WCE > 200)
  58.     if(!m_wndCommandBar.Create(this) ||
  59.        !m_wndCommandBar.InsertMenuBar(IDR_MAINFRAME) ||
  60.        !m_wndCommandBar.AddAdornments())
  61.     {
  62.         TRACE0("Failed to create CommandBar\n");
  63.         return -1;      // fail to create
  64.     }
  65. #else // MFC for Windows CE 1.0 and 2.0
  66.     if(!AddAdornments(0))
  67.     {
  68.         TRACE0("Failed to create CommandBar\n");
  69.         return -1;      // fail to create
  70.     }
  71. #endif
  72.  
  73.     return 0;
  74. }
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77. // CMainFrame diagnostics
  78.  
  79. #ifdef _DEBUG
  80. void CMainFrame::AssertValid() const
  81. {
  82.     CFrameWnd::AssertValid();
  83. }
  84.  
  85. void CMainFrame::Dump(CDumpContext& dc) const
  86. {
  87.     CFrameWnd::Dump(dc);
  88. }
  89. #endif //_DEBUG
  90.